#include <iostream>
#include <fstream>

using namespace std;
int dem = 0;
int main()
    {
          ofstream sochan("Sochan.txt");
          sochan<< "So chan tu 1 den 1000 la:\n";
                   for (int a = 1; a <= 1000 ; a++){
                       if (a%2 == 0)
                          {
                               dem += 1;
                               sochan<<a;
                               sochan<<" ";
                          }
                          if (dem %10 ==0)
                               sochan<<"\n";
                   }
          sochan.close();
          return 0;
    
    }
